package com.tsu.mall.admin.task;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

//清理定时任务
@Component
public class CleanTask {
    //cron表达式
    @Scheduled(cron = "0/10 * * * * ? ")
    public void clean(){
        //查attachment表中的无效数据

        //不要获取当前登录用户

        //遍历

        //对应文件删除
        //数据也删除
    }
}
